package org.muyuan.data.trans.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.muyuan.data.trans.dao.DataDictItem;
import org.muyuan.data.trans.dao.DataDictOptions;
import org.muyuan.data.trans.feign.DataTransFeignClient;
import org.muyuan.data.trans.service.DataTransSourceService;

import java.util.List;

/**
 * @PACKAGE_NAME: org.muyuan.srm.data.trans.service.impl
 * @NAME: DataTransSourceServiceimpl
 * @USER: chenzy
 * @DATE: 2024/12/16
 * @TIME: 09:37
 * @YEAR: 2024
 * @MONTH: 12
 */
@Slf4j
public class DefaultDataTransSourceService implements DataTransSourceService {

    private final DataTransFeignClient dataTransFeignClient;

    public DefaultDataTransSourceService(DataTransFeignClient dataTransFeignClient) {
        this.dataTransFeignClient = dataTransFeignClient;
        log.info("===============>init default data trans source end");
    }

    @Override
    public DataDictItem queryDictInfo(String dictCode, String tenantId) {
        return dataTransFeignClient.queryDictInfo(dictCode, tenantId);
    }

    @Override
    public List<DataDictOptions> queryDictValue(String dictCode, String tenantId) {
        return dataTransFeignClient.queryDictValue(dictCode, tenantId);
    }
}
